<template>
	<view class="container">

		<view class="admission-box" v-for="(item,index) in dataList.list" :key="index">
			<view class="university-name">{{item.collegeName}}</view>
			<view class="university-batch">{{item.batchSubject}}</view>
			<view class="admission-city">生源地：河南</view>
			<view class="table-box">
				<view class="table-row table-row-h">
					<view class="table-col table-col-left"></view>
					<view class="table-col">{{dataList.years[1]}}</view>
					<view class="table-col">{{dataList.years[2]}}</view>
					<view class="table-col border-right-none">{{dataList.years[3]}}</view>
				</view>
				<view class="table-row">
					<view class="table-col table-col-left">计划人数</view>
					<view class="table-col">{{item.dataList[0][1]}}</view>
					<view class="table-col">{{item.dataList[0][2]}}</view>
					<view class="table-col border-right-none"><strong>{{item.dataList[0][3]}}</strong></view>
				</view>
				<view class="table-row">
					<view class="table-col table-col-left">实际人数</view>
					<view class="table-col">{{item.dataList[1][1]}}</view>
					<view class="table-col">{{item.dataList[1][2]}}</view>
					<view class="table-col border-right-none">{{item.dataList[1][3]}}</view>
				</view>
				<view class="table-row">
					<view class="table-col table-col-left">录取最高分</view>
					<view class="table-col">{{item.dataList[2][1]}}</view>
					<view class="table-col">{{item.dataList[2][2]}}</view>
					<view class="table-col border-right-none">{{item.dataList[2][3]}}</view>
				</view>
				<view class="table-row">
					<view class="table-col table-col-left">最高分位次</view>
					<view class="table-col">{{item.dataList[3][1]}}</view>
					<view class="table-col">{{item.dataList[3][2]}}</view>
					<view class="table-col border-right-none">{{item.dataList[3][3]}}</view>
				</view>
				<view class="table-row">
					<view class="table-col table-col-left">录取最低分</view>
					<view class="table-col">{{item.dataList[4][1]}}</view>
					<view class="table-col">{{item.dataList[4][2]}}</view>
					<view class="table-col border-right-none">{{item.dataList[4][3]}}</view>
				</view>
				<view class="table-row">
					<view class="table-col table-col-left">最低分位次</view>
					<view class="table-col">{{item.dataList[5][1]}}</view>
					<view class="table-col">{{item.dataList[5][2]}}</view>
					<view class="table-col border-right-none">{{item.dataList[5][3]}}</view>
				</view>
				<view class="table-row">
					<view class="table-col table-col-left border-bottom-none">批次线</view>
					<view class="table-col border-bottom-none">{{item.dataList[6][1]}}</view>
					<view class="table-col border-bottom-none">{{item.dataList[6][2]}}</view>
					<view class="table-col border-right-none border-bottom-none">{{item.dataList[6][3]}}</view>
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	import { http, showToastMsg } from '../../utils'

	export default {
		data() {
			return {
				dataList: [],
				isEmpty: false,
				reqData: {
					id: 0
				}
			}
		},

		onLoad(options) {
			if (options.id) {
				this.reqData.id = options.id
			}
			this.fetchData()
		},

		methods: {
			
			fetchData() {
				const that = this
				
				http('/enrollment/list', that.reqData).then(res => {
					if (res.code == 20000) {
						if (res.data.list.length <= 0) {
							that.isEmpty = true
							return
						}
						that.dataList = res.data
					}
				})
			}
		}
	}
</script>

<style>
	page {
		background-color: #eeeeee;
	}

	.container {
		width: 750rpx;
		height: auto;
	}

	.noHave {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		color: #ccc;
		font-size: 32rpx;
		height: 48rpx;
	}

	.admission-box {
		width: 750rpx;
		background-color: #ffffff;
		padding-left: 20rpx;
		padding-right: 20rpx;
		padding-top: 30rpx;
		padding-bottom: 30rpx;
		margin-top: 20rpx;
	}

	.university-name {
		font-size: 30rpx;
	}

	.university-batch {
		font-size: 24rpx;
		color: #999999;
		margin-top: 10rpx;
	}

	.admission-city {
		font-size: 22rpx;
		color: #fc6216;
		margin-top: 10rpx;
	}

	.table-box {
		width: 706rpx;
		height: auto;
		border: solid 2rpx #d0dcea;
		margin-top: 30rpx;
		font-size: 30rpx;
	}

	.table-row-h {
		background-color: #d0dcea;
	}

	.table-row {
		display: flex;
		flex-direction: row;
	}

	.table-col {
		width: 150rpx;
		text-align: center;
		padding-top: 20rpx;
		padding-bottom: 20rpx;
		border-right: solid 2rpx #d0dcea;
		border-bottom: solid 2rpx #d0dcea;
	}

	.table-col-left {
		width: 250rpx !important;
	}

	.border-right-none {
		border-right: none !important;
	}

	.border-bottom-none {
		border-bottom: none !important;
	}
</style>
